﻿@model IEnumerable<WebSiteFool.Models.Article>
<?xml version="1.0" encoding="UTF-8" ?>
@{
    Response.ContentType = "application/rss+xml";
    Layout = "";
}
<rss version="2.0">
    <channel>
        <title>The Blog</title>
        <link>@Url.Action("Index", "Home", null, "http")</link>
        <description>The Blog RSS feed</description>
        <lastBuildDate>@Model.First().CreateDate.ToString("r") </lastBuildDate>
        <language>en-us</language>
 
        @foreach (var p in Model)
        {
            <item>
                <title>@p.Title</title>
                <link>@Url.Action("Post", "Home", new { id = p.Id }, "http")</link>
                <guid>@Url.Action("Post", "Home", new { id = p.Id }, "http")</guid>
                <pubDate>@p.CreateDate.ToString("r")</pubDate>
                <description>
                    @(p.Content.Substring(0, 200) +
                        @Html.ActionLink("Read More...", "Show", "Article", new { id = p.Id }, null))
                </description>
            </item>
        }
 
    </channel>
</rss>
